<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix='fmt' %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<c:set var="title" value="评论管理"/>
<%@include file="common/adminHeader.jsp" %>
<c:set var="light" value="9"/>
<%@include file="common/adminNavigator.jsp" %>
<style>
    #tablelist span {
        height: 80px;
        line-height: 80px;
    }
</style>
<div class="container" >
    <div class="right-top-box">
        <div class="btn bs-bars">
            <a class="btn-product" id="btn_add" title="添加">
                <i class="fa fa-plus fa-fw"></i>
            </a>
            <a class="btn-delete" id="btn_delete_ids" title="批量删除">
                <i class="fa fa-trash-o fa-fw"></i>
            </a>
        </div>
        <div class="row" id="tb">
            <div class="col-md-12">
                <form class="form-inline" id="resource-form">
                    <div class="group-inner">
                        <input type="text" class="form-control form-input" id="search-user_id" name="search-user_id" placeholder="用户id">
                    </div>
                    <div class="group-inner">
                        <input type="text" class="form-control form-input" id="search-parent_id" name="search-parent_id"  placeholder="父类id">
                    </div>
                    <div class="group-inner">
                        <input type="text" class="form-control form-input" id="search-product_id" name="search-product_id" placeholder="商品id">
                    </div>
                    <a class="btn btn-info glyphicon glyphicon-search form-search group-inner" id="btnSearch" >
                    </a>
                </form>
            </div>
        </div>
    </div>

    <sec:authorize access="hasRole('ADMIN')">
        <div class="modal fade" id="addOrUpdateModal" tabindex="-1" role="dialog" aria-labelledby="addroleLabel" data-backdrop="static" aria-hidden="false">
            <div class="modal-backdrop fade"></div>
            <div class="modal-dialog modal-lg" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                        <h4 class="modal-title" id="addroleLabel">修改分类</h4>
                    </div>
                    <div class="modal-body">
                        <form id="addOrUpdateForm" class="form-horizontal form-label-left" novalidate="">
                            <input type="hidden" name="id" id="id" value="">
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="user_name">用户名</label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" class="form-control col-md-7 col-xs-12" name="user_name" id="user_name" placeholder="请输入用户名">
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="product_id">商品id</label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" class="form-control col-md-7 col-xs-12" id="product_id" name="product_id" placeholder="请输入商品id">
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="content">评论</label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" class="form-control col-md-7 col-xs-12" id="content" name="content" placeholder="请输入评论">
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="reply">回复</label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" class="form-control col-md-7 col-xs-12" id="reply" name="reply" placeholder="请输入回复">
                                </div>
                            </div>
                                <div class="item form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="parent_id">父类id</label>
                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                        <input type="text" class="form-control col-md-7 col-xs-12" id="parent_id" name="parent_id" placeholder="请输入父类id">
                                    </div>
                                </div>
                                <div class="item form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="user_id">用户id</label>
                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                        <input type="text" class="form-control col-md-7 col-xs-12" id="user_id" name="user_id" placeholder="请输入用户id">
                                    </div>
                                </div>
                                <div class="item form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="orderitem_id">订单id</label>
                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                        <input type="text" class="form-control col-md-7 col-xs-12" name="orderitem_id" id="orderitem_id" placeholder="请输入订单id">
                                    </div>
                                </div>
                                <div class="item form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="support">点赞</label>
                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                        <input type="text" class="form-control col-md-7 col-xs-12" name="support" id="support" placeholder="请输入点赞数">
                                    </div>
                                </div>
                                <div class="item form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="oppose">踩数</label>
                                    <div class="col-md-6 col-sm-6 col-xs-12">
                                        <input type="text" class="form-control col-md-7 col-xs-12" id="oppose" name="oppose" placeholder="请输入踩数">
                                    </div>
                                </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close"> 关闭</i></button>
                        <button type="button" class="btn btn-success addOrUpdateBtn"><i class="fa fa-save">保存</i></button>
                    </div>
                </div>
            </div>
        </div>
    </sec:authorize>
    <sec:authorize access="hasAnyRole('SHOP_ADMIN','SHOP_USER')">
        <div class="modal fade" id="addOrUpdateModal" tabindex="-1" role="dialog" aria-labelledby="addroleLabel" data-backdrop="static" aria-hidden="false">
            <div class="modal-backdrop fade"></div>
            <div class="modal-dialog modal-lg" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                        <h4 class="modal-title" id="addroleLabel">修改分类</h4>
                    </div>
                    <div class="modal-body">
                        <form id="addOrUpdateForm" class="form-horizontal form-label-left" novalidate="">
                            <input type="hidden" name="id" id="id" value="">
                            <input type="hidden" name="parent_id" id="parent_id" value="">
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="user_name">用户名</label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" class="form-control col-md-7 col-xs-12" name="user_name" id="user_name" readonly>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="product_id">商品id</label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" class="form-control col-md-7 col-xs-12" id="product_id" name="product_id" readonly>
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="content">评论</label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" class="form-control col-md-7 col-xs-12" id="content" name="content">
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="reply">回复</label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" class="form-control col-md-7 col-xs-12" id="reply" name="reply" placeholder="请输入回复">
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close"> 关闭</i></button>
                        <button type="button" class="btn btn-success addOrUpdateBtn"><i class="fa fa-save">保存</i></button>
                    </div>
                </div>
            </div>
        </div>
    </sec:authorize>

    <table id="tablelist"></table>
    <script type="text/javascript" src="render/js/manager/common.js"></script>
    <script type="text/javascript" src="render/js/manager/commentManager.js"></script>
</div>

<%@include file="common/adminFooter.jsp" %>
